# $Id: PKGBUILD 65152 2012-02-20 05:25:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Gleidson <gleidson.echeli@gmail.com>

pkgname=emacs-haskell-mode
pkgver=2.8.0
pkgrel=4
pkgdesc="Haskell mode package for Emacs"
arch=(any)
license=('GPL')
url="http://projects.haskell.org/haskellmode-emacs/"
#url="http://haskell.org/haskell-mode/"
install=emacs-haskell-mode.install
makedepends=('emacs')
source=(http://projects.haskell.org/haskellmode-emacs/haskell-mode-$pkgver.tar.gz)
md5sums=('64435a26bd070e56481b8d0ad826ac63')

build() {
  # remove unnecessary files
  rm -f $srcdir/haskell-mode-$pkgver/ChangeLog
  rm -f $srcdir/haskell-mode-$pkgver/Makefile
  rm -f $srcdir/haskell-mode-$pkgver/NEWS
  rm -f $srcdir/haskell-mode-$pkgver/README

  install -d $pkgdir/usr/share/emacs/site-lisp/haskell-mode
  install -m644 $srcdir/haskell-mode-$pkgver/* -t $pkgdir/usr/share/emacs/site-lisp/haskell-mode
  emacs -batch --eval '(setq load-path (cons "." load-path))' -f batch-byte-compile $pkgdir/usr/share/emacs/site-lisp/haskell-mode/*.el
}
